//
//  e7timemanager.h
//  e7engine
//
//  Created by cc on 12-6-12.
//  Copyright (c) 2012年 cc. All rights reserved.
//

#ifndef e7engine_e7timemanager_h
#define e7engine_e7timemanager_h

#include "e7utilitydefine.h"
#include "e7singleton.h"

namespace e7engine {
    class CE7TimeManager : public CE7Singleton<CE7TimeManager>
    {
    public:
        CE7TimeManager() ;
        ~CE7TimeManager() ;
        
        const unsigned int GetTimeUINT() ;
        const char*        GetTimeSTR() ;
        
    protected:
        const unsigned int GetYear()    const { return (m_insTM.tm_year+1900) ; }   // 4
        const unsigned int GetMon()     const { return (m_insTM.tm_mon+1) ; }       // 2
        const unsigned int GetMDay()    const { return (m_insTM.tm_mday) ; }        // 2
        const unsigned int GetHour()    const { return (m_insTM.tm_hour) ; }        // 2
        const unsigned int GetMin()     const { return (m_insTM.tm_min) ; }         // 2
        const unsigned int GetSec()     const { return (m_insTM.tm_sec) ; }         // 2
        const unsigned int GetYDay()    const { return (m_insTM.tm_yday) ; }        // 2 *
        const unsigned int GetWeek()    const { return (m_insTM.tm_wday) ; }        // 2 *
        
    private:
        char    m_strTime[_STRLEN_TIME] ;
        tm      m_insTM ;
        struct timeval m_insTimeVal ;
        
    } ;
}

#endif











